package com.ticket.sass.admin.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ticket.sass.common.entity.tenant.RoleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author ywb
 * @date 2022-3-22 17:46
 */
@Mapper
public interface RoleMapper extends BaseMapper<RoleEntity> {

    @Select("SELECT role.* FROM roles role LEFT JOIN admin_role_maps map on role.id = map.role_id ${ew.customSqlSegment}")
    List<RoleEntity> listByAdminId(@Param(Constants.WRAPPER) QueryWrapper<RoleEntity> queryWrapper);
    
    
    
}